from drg_group.yinchuan_2023.Base import message,intersect,SS_VALID
from drg_group.yinchuan_2023.DRG import MDCD_DRG

def group(record):
  adrg_zd=["H81.000","H81.100","H81.200","H81.301","H81.302","H81.303","H81.400","H81.400x003","H81.800","H81.900","H81.901","H81.902","H83.000","H83.300x001","H83.302","H83.800x003","H90.000","H90.100","H90.200","H90.300","H90.400","H90.500","H90.600","H90.700","H90.801","H91.200","H91.200x001","H91.900","H91.900x002","H91.900x004","H91.901","H93.001","H93.100","H93.101","H93.102"]
  adrg_zd1=[]
  adrg_ss=[]
  adrg_ss1=[]
  adrg_ss2=[]
  dept_list=[]
  if True and record.zdList[0] in adrg_zd:
    message('符合DS1入组条件，匹配规则：主诊断匹配')
    
    if MDCD_DRG.DS19_group(record):
      return 'DS19'

    return 'DS1'
  else:
    return ''

